package day4.homework;

public class Vehicle {
    // 速度
    private double speed;
    /**
     * 体积
     */
    private double size;

    public Vehicle() {
    }

    public Vehicle(double speed, double size) {
        this.speed = speed;
        this.size = size;
    }

    public void move() {
        System.out.println("当前正以"+speed+"速度移动");
    }

    public void speedUp(double speed) {
        this.speed += speed;
    }

    public void speedDown(double speed) {
        this.speed -= speed;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    public double getSize() {
        return size;
    }

    public void setSize(double size) {
        this.size = size;
    }
}
